﻿using System;
using System.Collections.Generic;

namespace SharpSqlAnalyzer.nodes
{
	// Token: 0x020002BD RID: 701
	public class TDmlEventClause : TTriggerEventClause
	{
		// Token: 0x17000502 RID: 1282
		// (get) Token: 0x060017D5 RID: 6101 RVA: 0x0032893D File Offset: 0x00326B3D
		// (set) Token: 0x060017D6 RID: 6102 RVA: 0x00328945 File Offset: 0x00326B45
		public virtual TObjectName TableName
		{
			get
			{
				return this.tableName;
			}
			set
			{
				this.tableName = value;
			}
		}

		// Token: 0x060017D7 RID: 6103 RVA: 0x00328950 File Offset: 0x00326B50
		public override void init(object arg1, object arg2)
		{
			if (arg1 is List<TTriggerEventItem>)
			{
				base.init(arg1);
				this.tableName = (TObjectName)arg2;
				this.tableName.ObjectType = 3;
				return;
			}
			this.tableName = (TObjectName)arg1;
			this.tableName.ObjectType = 3;
			this.dml_event_items = (TDummyList)arg2;
			for (int i = 0; i < this.dml_event_items.size(); i++)
			{
				TDummy dummyItem = this.dml_event_items.getDummyItem(i);
				if (dummyItem.ToString().StartsWith("delete", StringComparison.Ordinal))
				{
					this.isDelete = true;
				}
				else if (dummyItem.ToString().StartsWith("insert", StringComparison.Ordinal))
				{
					this.isInsert = true;
				}
				else if (dummyItem.ToString().StartsWith("update", StringComparison.Ordinal))
				{
					this.isUpdate = true;
					if (dummyItem.list1 != null)
					{
						this.columnList = (TObjectNameList)dummyItem.list1;
					}
				}
			}
		}

		// Token: 0x17000503 RID: 1283
		// (get) Token: 0x060017D8 RID: 6104 RVA: 0x00328A3C File Offset: 0x00326C3C
		// (set) Token: 0x060017D9 RID: 6105 RVA: 0x00328A44 File Offset: 0x00326C44
		public virtual bool Delete
		{
			get
			{
				return this.isDelete;
			}
			set
			{
				this.isDelete = value;
			}
		}

		// Token: 0x17000504 RID: 1284
		// (get) Token: 0x060017DA RID: 6106 RVA: 0x00328A4D File Offset: 0x00326C4D
		// (set) Token: 0x060017DB RID: 6107 RVA: 0x00328A55 File Offset: 0x00326C55
		public virtual bool Update
		{
			get
			{
				return this.isUpdate;
			}
			set
			{
				this.isUpdate = value;
			}
		}

		// Token: 0x17000505 RID: 1285
		// (get) Token: 0x060017DC RID: 6108 RVA: 0x00328A5E File Offset: 0x00326C5E
		// (set) Token: 0x060017DD RID: 6109 RVA: 0x00328A66 File Offset: 0x00326C66
		public virtual bool Insert
		{
			get
			{
				return this.isInsert;
			}
			set
			{
				this.isInsert = value;
			}
		}

		// Token: 0x17000506 RID: 1286
		// (get) Token: 0x060017DE RID: 6110 RVA: 0x00328A6F File Offset: 0x00326C6F
		// (set) Token: 0x060017DF RID: 6111 RVA: 0x00328A77 File Offset: 0x00326C77
		public virtual TObjectNameList ColumnList
		{
			get
			{
				return this.columnList;
			}
			set
			{
				this.columnList = value;
			}
		}

		// Token: 0x17000507 RID: 1287
		// (set) Token: 0x060017E0 RID: 6112 RVA: 0x00328A80 File Offset: 0x00326C80
		public virtual TDummyList Dml_event_items
		{
			set
			{
				this.dml_event_items = value;
			}
		}

		// Token: 0x04001832 RID: 6194
		internal TObjectName tableName;

		// Token: 0x04001833 RID: 6195
		private TDummyList dml_event_items;

		// Token: 0x04001834 RID: 6196
		private TObjectNameList columnList;

		// Token: 0x04001835 RID: 6197
		private bool isDelete;

		// Token: 0x04001836 RID: 6198
		private bool isInsert;

		// Token: 0x04001837 RID: 6199
		private bool isUpdate;
	}
}
